package com.xinzhiduming.mp3palyer;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHelper extends SQLiteOpenHelper{
	public static final int VERSION = 1;	
	private static final String CREATETABLESQL_PALYED_INFO = "create table if not exists PlayedInfoTable(SONG_FOLDER_PATH varchar(256), LAST_TIME_PALYED_SONG varchar(50), PLAYED_SONG_POSTION INTEGER, MUST_HAS_HEAD_SET INTEGER)";
	
	public DatabaseHelper(Context context, String name, CursorFactory factory, int version) {
		super(context, name, factory, version);
		// TODO Auto-generated constructor stub
	}
	
	public DatabaseHelper(Context context, String name, int version)
	{
		this(context,name,null,version);  
	}
	
	public DatabaseHelper(Context context, String name)
	{
		this(context,name,VERSION);  
	}	

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL(CREATETABLESQL_PALYED_INFO);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}

}
